package com.example.demo.utils.wx;

/**
 * 微信支付配置
 */
public class WxConfig {
    /** 开放平台 用于移动端调用 */
    public static final String appid = "";  // 开放平台APPID
    public static final String appKey = ""; // 开放平台密钥
    public static final String merid = ""; // 微信支付商户平台
    /** 公众平台 用于微信内调起微信支付JSAPI */
    public static final String publicappid = ""; // 公众平台AppID
    public static final String publicappkey = ""; // 公众平台密钥

    /** 商户平台密钥 有坑，第一次配置不好使（提示签名错误），配置第二次才好使 */
    public static final String merkey = "";
    /** 商户API证书 */
    public static final String merCert = "";

    /** 支付回调地址 */
    public static final String notify = "";
    /** 退款回调地址 */
    public static final String refundNotify = "";

    /** 统一下单接口 */
    public static final String unifiedorderUrl = "https://api.mch.weixin.qq.com/pay/unifiedorder";
    /**查询订单 */
    public static final String orderqueryUrl = "https://api.mch.weixin.qq.com/pay/orderquery";
    /** 订单退款 */
    public static final String refundUrl = "https://api.mch.weixin.qq.com/secapi/pay/refund";
    /** 退款查询 */
    public static final String refundqueryUrl = "https://api.mch.weixin.qq.com/pay/refundquery";

    /** 支付方式 */
    public static final String FROM_APP = "APP";
    public static final String FROM_JSAPI = "JSAPI";


    /** APP 微信登录 第一步获取access_token、第二步获取用户信息 */
    public static final String accessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=";
    public static final String getUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token=";

    /** js sdk 微信登录 第一步获取凭据，第二步获取票据 */
    public static final String jsSdkTokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=";
    public static final String jsSdkTicketUrl = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=";
}
